From 9c3b29a7729ff0aefb9fdcbb715df48c4d45a9f5 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Thu, 8 Mar 2007 23:16:34 +0000 Subject: [PATCH] Remove crashdump.create -- this doesn't make sense. Signed-off-by: Ewan Mellor --- docs/xen-api/xenapi-datamodel.tex | 84 +++++++++------------------- tools/libxen/include/xen_crashdump.h | 23 +++----- tools/libxen/src/xen_crashdump.c | 37 ++++-------- 3 files changed, 44 insertions(+), 100 deletions(-) diff --git a/docs/xen-api/xenapi-datamodel.tex b/docs/xen-api/xenapi-datamodel.tex index cce4ae5cc7..319713e2e2 100644 --- a/docs/xen-api/xenapi-datamodel.tex +++ b/docs/xen-api/xenapi-datamodel.tex @@ -11885,34 +11885,13 @@ $\mathit{RO}_\mathit{ins}$ & {\tt VDI} & VDI ref & the virtual disk \\ \hline \end{longtable} \subsection{Additional RPCs associated with class: crashdump} -\subsubsection{RPC name:~get\_all} - -{\bf Overview:} -Return a list of all the crashdumps known to the system. - - \noindent {\bf Signature:} -\begin{verbatim} ((crashdump ref) Set) get_all (session_id s)\end{verbatim} - - -\vspace{0.3cm} - - \noindent {\bf Return Type:} -{\tt -(crashdump ref) Set -} - - -references to all objects -\vspace{0.3cm} -\vspace{0.3cm} -\vspace{0.3cm} -\subsubsection{RPC name:~get\_uuid} +\subsubsection{RPC name:~destroy} {\bf Overview:} -Get the uuid field of the given crashdump. +Destroy the specified crashdump. \noindent {\bf Signature:} -\begin{verbatim} string get_uuid (session_id s, crashdump ref self)\end{verbatim} +\begin{verbatim} void destroy (session_id s, crashdump ref self)\end{verbatim} \noindent{\bf Arguments:} @@ -11922,7 +11901,7 @@ Get the uuid field of the given crashdump. \begin{tabular}{|c|c|p{7cm}|} \hline {\bf type} & {\bf name} & {\bf description} \\ \hline -{\tt crashdump ref } & self & reference to the object \\ \hline +{\tt crashdump ref } & self & The crashdump to destroy \\ \hline \end{tabular} @@ -11930,53 +11909,42 @@ Get the uuid field of the given crashdump. \noindent {\bf Return Type:} {\tt -string +void } -value of the field + \vspace{0.3cm} \vspace{0.3cm} \vspace{0.3cm} -\subsubsection{RPC name:~get\_VM} +\subsubsection{RPC name:~get\_all} {\bf Overview:} -Get the VM field of the given crashdump. +Return a list of all the crashdumps known to the system. \noindent {\bf Signature:} -\begin{verbatim} (VM ref) get_VM (session_id s, crashdump ref self)\end{verbatim} - - -\noindent{\bf Arguments:} - - -\vspace{0.3cm} -\begin{tabular}{|c|c|p{7cm}|} - \hline -{\bf type} & {\bf name} & {\bf description} \\ \hline -{\tt crashdump ref } & self & reference to the object \\ \hline +\begin{verbatim} ((crashdump ref) Set) get_all (session_id s)\end{verbatim} -\end{tabular} \vspace{0.3cm} \noindent {\bf Return Type:} {\tt -VM ref +(crashdump ref) Set } -value of the field +references to all objects \vspace{0.3cm} \vspace{0.3cm} \vspace{0.3cm} -\subsubsection{RPC name:~get\_VDI} +\subsubsection{RPC name:~get\_uuid} {\bf Overview:} -Get the VDI field of the given crashdump. +Get the uuid field of the given crashdump. \noindent {\bf Signature:} -\begin{verbatim} (VDI ref) get_VDI (session_id s, crashdump ref self)\end{verbatim} +\begin{verbatim} string get_uuid (session_id s, crashdump ref self)\end{verbatim} \noindent{\bf Arguments:} @@ -11994,7 +11962,7 @@ Get the VDI field of the given crashdump. \noindent {\bf Return Type:} {\tt -VDI ref +string } @@ -12002,13 +11970,13 @@ value of the field \vspace{0.3cm} \vspace{0.3cm} \vspace{0.3cm} -\subsubsection{RPC name:~create} +\subsubsection{RPC name:~get\_VM} {\bf Overview:} -Create a new crashdump instance, and return its handle. +Get the VM field of the given crashdump. \noindent {\bf Signature:} -\begin{verbatim} (crashdump ref) create (session_id s, crashdump record args)\end{verbatim} +\begin{verbatim} (VM ref) get_VM (session_id s, crashdump ref self)\end{verbatim} \noindent{\bf Arguments:} @@ -12018,7 +11986,7 @@ Create a new crashdump instance, and return its handle. \begin{tabular}{|c|c|p{7cm}|} \hline {\bf type} & {\bf name} & {\bf description} \\ \hline -{\tt crashdump record } & args & All constructor arguments \\ \hline +{\tt crashdump ref } & self & reference to the object \\ \hline \end{tabular} @@ -12026,21 +11994,21 @@ Create a new crashdump instance, and return its handle. \noindent {\bf Return Type:} {\tt -crashdump ref +VM ref } -reference to the newly created object +value of the field \vspace{0.3cm} \vspace{0.3cm} \vspace{0.3cm} -\subsubsection{RPC name:~destroy} +\subsubsection{RPC name:~get\_VDI} {\bf Overview:} -Destroy the specified crashdump instance. +Get the VDI field of the given crashdump. \noindent {\bf Signature:} -\begin{verbatim} void destroy (session_id s, crashdump ref self)\end{verbatim} +\begin{verbatim} (VDI ref) get_VDI (session_id s, crashdump ref self)\end{verbatim} \noindent{\bf Arguments:} @@ -12058,11 +12026,11 @@ Destroy the specified crashdump instance. \noindent {\bf Return Type:} {\tt -void +VDI ref } - +value of the field \vspace{0.3cm} \vspace{0.3cm} \vspace{0.3cm} diff --git a/tools/libxen/include/xen_crashdump.h b/tools/libxen/include/xen_crashdump.h index fff0a1a144..00869dbb4c 100644 --- a/tools/libxen/include/xen_crashdump.h +++ b/tools/libxen/include/xen_crashdump.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, XenSource Inc. + * Copyright (c) 2006-2007, XenSource Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -161,20 +161,6 @@ extern bool xen_crashdump_get_by_uuid(xen_session *session, xen_crashdump *result, char *uuid); -/** - * Create a new crashdump instance, and return its handle. - */ -extern bool -xen_crashdump_create(xen_session *session, xen_crashdump *result, xen_crashdump_record *record); - - -/** - * Destroy the specified crashdump instance. - */ -extern bool -xen_crashdump_destroy(xen_session *session, xen_crashdump crashdump); - - /** * Get the uuid field of the given crashdump. */ @@ -196,6 +182,13 @@ extern bool xen_crashdump_get_vdi(xen_session *session, xen_vdi *result, xen_crashdump crashdump); +/** + * Destroy the specified crashdump + */ +extern bool +xen_crashdump_destroy(xen_session *session, xen_crashdump self); + + /** * Return a list of all the crashdumps known to the system. */ diff --git a/tools/libxen/src/xen_crashdump.c b/tools/libxen/src/xen_crashdump.c index 53504ba249..2d3840896e 100644 --- a/tools/libxen/src/xen_crashdump.c +++ b/tools/libxen/src/xen_crashdump.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, XenSource Inc. + * Copyright (c) 2006-2007, XenSource Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -115,38 +115,24 @@ xen_crashdump_get_by_uuid(xen_session *session, xen_crashdump *result, char *uui bool -xen_crashdump_create(xen_session *session, xen_crashdump *result, xen_crashdump_record *record) +xen_crashdump_get_vm(xen_session *session, xen_vm *result, xen_crashdump crashdump) { abstract_value param_values[] = { - { .type = &xen_crashdump_record_abstract_type_, - .u.struct_val = record } + { .type = &abstract_type_string, + .u.string_val = crashdump } }; abstract_type result_type = abstract_type_string; *result = NULL; - XEN_CALL_("crashdump.create"); - return session->ok; -} - - -bool -xen_crashdump_destroy(xen_session *session, xen_crashdump crashdump) -{ - abstract_value param_values[] = - { - { .type = &abstract_type_string, - .u.string_val = crashdump } - }; - - xen_call_(session, "crashdump.destroy", param_values, 1, NULL, NULL); + XEN_CALL_("crashdump.get_VM"); return session->ok; } bool -xen_crashdump_get_vm(xen_session *session, xen_vm *result, xen_crashdump crashdump) +xen_crashdump_get_vdi(xen_session *session, xen_vdi *result, xen_crashdump crashdump) { abstract_value param_values[] = { @@ -157,24 +143,21 @@ xen_crashdump_get_vm(xen_session *session, xen_vm *result, xen_crashdump crashdu abstract_type result_type = abstract_type_string; *result = NULL; - XEN_CALL_("crashdump.get_VM"); + XEN_CALL_("crashdump.get_VDI"); return session->ok; } bool -xen_crashdump_get_vdi(xen_session *session, xen_vdi *result, xen_crashdump crashdump) +xen_crashdump_destroy(xen_session *session, xen_crashdump self) { abstract_value param_values[] = { { .type = &abstract_type_string, - .u.string_val = crashdump } + .u.string_val = self } }; - abstract_type result_type = abstract_type_string; - - *result = NULL; - XEN_CALL_("crashdump.get_VDI"); + xen_call_(session, "crashdump.destroy", param_values, 1, NULL, NULL); return session->ok; } -- 2.30.2